<ion-view title="事件录入">
  <ion-content overflow-scroll="true" padding="true" class="has-header">
    <form class="list"  ng-submit="submit()" novalidate>
      <ion-list>
        <div class="item item-input" name="nickName">
          <span class="input-div">事件描述</span>
          <input type="text" placeholder="必填" required ng-model="data.eventDesc" required bsy-form-validate="eventDescNoErrorTips">
        </div>

        <ion-toggle toggle-class="toggle-positive" ng-model="data.isInvolvedSomeOne">是否涉及人员信息</ion-toggle>

        <div ng-show="data.isInvolvedSomeOne">
          <div class="item item-divider">
            涉事人员信息
          </div>
          <div class="item item-input" name="usedName">
            <span class="input-div">姓名</span>
            <input type="text" placeholder="必填" ng-model="data.involedName" ng-required="data.isInvolvedSomeOne"
                   bsy-form-validate="involedNameErrorTips">
          </div>
          <div class="item item-input" name="usedName">
            <span class="input-div">曾用名</span>
            <input type="text" placeholder="" ng-model="data.involveUsedName">
          </div>
          <div class="item item-select">
            <span class="input-div">性别</span>
            <select ng-model="data.involedGener">
              <option value="1">男</option>
            <option value="2">女</option>
            </select>
          </div>
          <div class="item item-input" name="ID">
            <span class="input-div">身份证</span>
            <input type="text" placeholder="必填" ng-model="data.involvedIdCardNo"
                   ng-maxlength="18"
                   ng-minlength="18"
                   ng-required="data.isInvolvedSomeOne"
                   bsy-form-validate="involvedIdCardNoErrorTips">
          </div>
          <div class="item item-input" name="phoneNum">
            <span class="input-div">联系电话</span>
            <input type="tel" placeholder="" ng-model="data.involvedTelephone">
          </div>
          <div class="item item-input" name="residentialAddress">
            <span class="input-div">现住址</span>
            <input type="text" placeholder="必填" ng-model="data.involedlivingaddress" ng-required="data.isInvolvedSomeOne"
                   bsy-form-validate="involedlivingaddressNoErrorTips">
          </div>


        </div>



        <div class="item item-divider">
          事件信息
        </div>
        <div class="item item-select">
          <span class="input-div">事件来源</span>
          <select ng-options="eventSource.value as eventSource.label for eventSource in eventSourceDictList" name="eventSource"
                  bsy-form-validate="eventSourceErrorTips" required
                  ng-model="data.eventSource">
            <option value="">请选择</option>
          </select>

        </div>
        <div class="item item-input">
          <span class="input-div">采集原因</span><textarea placeholder="必填"
                                                       ng-model="data.collectionCasuse"
                                                       rows="2"
                                                       required
                                                       bsy-form-validate="collectionCasuseErrorTips"> </textarea>
        </div>

        <div class="item item-input">
          <span class="input-div">现场照片</span>
          <div style="width: 80%">

            <ion-photo-grid
              ion-Item-Callback="ionItemCallback"
              remove-item-callback="removeItem"
              add-another-callback="addPicture"
              ion-with-remove-button="true"
              ion-with-add-button="true"
              ion-photo-num-per-row="3"
              ion-photo-items="items">

            </ion-photo-grid>

          </div>
        </div>
      </ion-list>
      <button class="button button-positive button-block " check-form>提交</button>
    </form>
  </ion-content>
</ion-view>
